package com.company;


import java.util.Scanner;

/**
 * @author jrue
 * @version 1.0
 * @date 2020/3/22 10:04
 */
public class Main31 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        if (n == 0) {
            System.out.println("0,0,0");
            return;
        }
        if (n <= 3) {
            System.out.println(n + ",0,0");
            return;
        }
        if (n == 4) {
            System.out.println("0,1,0");
            return;
        }
        if (n == 5) {
            System.out.println("0,0,1");
            return;
        }
        int[] dp = new int[n + 1];
        dp[1] = 1;
        dp[2] = 2;
        dp[3] = 3;
        dp[4] = 1;
        dp[5] = 1;

        for (int i = 6; i < dp.length; i++) {
            int count01 = dp[i - 5];
            int count02 = dp[i - 4];
            int count03 = dp[i - 1];
            dp[i] = Math.min(count01,Math.min(count02,count03)) + 1;
        }
        int count = dp[n];
        for (int i = 0; i <= count; i++) {
            for (int j = count - i; j >= 0; j--) {
                for (int k = count - i - j; k >= 0 ; k--) {
                    if ((i * 5 + j * 4 + k) == n) {
                        System.out.println(k +"," + j + "," + i);
                        return;
                    }
                }
            }
        }
    }

}
